import request from '@/utils/request'

export function getDepts(params) {
  return request({
    url: '/ids/dept/listPage',
    method: 'get',
    params
  })
}

export function add(data) {
  return request({
    url: '/ids/dept/save',
    method: 'post',
    data
  })
}

export function del(id) {
  return request({
    url: '/ids/dept/delete/' + id,
    method: 'delete'
  })
}

export function edit(data) {
  return request({
    url: '/ids/dept/update',
    method: 'put',
    data
  })
}

// 获取一级分类
export function getPostDepts(params) {
  return request({
    url: '/ejob/jobCategory/list',
    method: 'get',
    params
  })
}

// 新增岗位
export function addPost(data) {
  return request({
    url: '/ejob/jobCategory',
    method: 'post',
    data
  })
}

// 删除岗位
export function delPost(id) {
  return request({
    url: '/ejob/jobCategory/' + id,
    method: 'delete'
  })
}

// 编辑岗位
export function editPost(data) {
  return request({
    url: '/ejob/jobCategory',
    method: 'put',
    data
  })
}
